package fr.uniscol.siecle.model;

import java.io.Serializable;

public class OptionEleve implements Serializable, DonneeSiecle {

	private int num = 0;
	
	private Matiere matiere = null;
	
	private ModaliteElection modalite = null;

	public OptionEleve() {
		super();
	}

	public OptionEleve(int num, Matiere matiere, ModaliteElection modalite) {
		super();
		this.num = num;
		this.matiere = matiere;
		this.modalite = modalite;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public Matiere getMatiere() {
		return matiere;
	}

	public void setMatiere(Matiere matiere) {
		this.matiere = matiere;
	}

	public ModaliteElection getModalite() {
		return modalite;
	}

	public void setModalite(ModaliteElection modalite) {
		this.modalite = modalite;
	}

	@Override
	public boolean equals(Object obj) {
		OptionEleve opt = (OptionEleve)obj;

		return opt.getMatiere().equals(getMatiere()) && opt.getModalite().equals(getModalite());
	}

	@Override
	public int hashCode() {
		return super.hashCode();
	}
}
